package com.yeyv.net.Config;

import com.yeyv.net.Annotation.ControllerApi.AnonController;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class CustomWebMvcCofig implements WebMvcConfigurer {
    //访问前缀
    @Override
    public void configurePathMatch(PathMatchConfigurer configurer) {
        configurer.addPathPrefix("/anon", c -> c.isAnnotationPresent(AnonController.class));
    }
}
